﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using sfsocket.corelib.connection.server;
using sfsocket.corelib.message;

namespace chat_server
{
    public class ChatClient : ChatServerConnection
    {
        private string m_username;
        
        public ChatClient(string _name)
        {
            this.m_username = _name;
        }

        public void Broadcast(BaseMessage msg)
        {
            lock(m_AllConnections)
            {
                foreach (ChatServerConnection con in m_AllConnections)
                {
                    con.SendMsg(msg);
                }
            }
        }

        public void SendAllUsers()
        {

        }

        public void Login()
        {

        }

        public void Logout()
        {

        }
    }
}
